﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Activities;

namespace ERPStore.Tasks.Workflows
{
	/// <summary>
	/// Methode liées à l'execution de workflows
	/// </summary>
	public static class WorkflowHelper
	{

		public static IDictionary<string, object> ExecuteManualWorkflow(System.Activities.Activity workflow, Dictionary<string , object> parameters)
		{
			var wi = new WorkflowInvoker(workflow);
			// wi.Extensions.Add<Microsoft.Practices.ServiceLocation.IServiceLocator>(() => Microsoft.Practices.ServiceLocation.ServiceLocator.Current);
			var output = wi.Invoke(parameters);
			return output;
		}

	}
}
